# Please install OpenAI SDK first: `pip3 install openai`

from openai import OpenAI

client = OpenAI(api_key="sk-8d1b4abc924c45ad8ee63d37d1e95c9c", base_url="https://api.deepseek.com")

while True:
    question = input("请输入您的问题：")
    response = client.chat.completions.create(
        model="deepseek-chat",
        messages=[
            {"role": "system", "content": "You are a helpful assistant"},
            {"role": "user", "content": question},
        ],
        stream=True
    )
    print(response.choices[0].message.content)
